/**
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
* 注意：
* 本软件为www.yixiang.co开发研制，未经购买不得使用
* 购买后可获得全部源代码（禁止转卖、分享、上传到码云、github等开源平台）
* 一经发现盗用、分享等行为，将追究法律责任，后果自负
*/
package co.yixiang.modules.tanzer.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;

import javax.persistence.Transient;
import javax.validation.constraints.*;
import java.util.Date;
import co.yixiang.domain.BaseDomain;

/**
* @author tanzer
* @date 2024-08-04
*/
@Data
@TableName("ZHIJ_ERP_PRODUCT_STOCK")
public class ProductStock extends BaseDomain {
    /** 表ID，主键，供其他表做外键 */
    @TableId
    private Long id;

    /** 产品id */
    @NotNull
    private Long productId;

    /** 仓库id */
    @NotNull
    private Long storehouseId;

    /** 货架编号 */
    @NotNull
    private String shelvesCode;

    /** 备注说明 */
    private String remark;



    private String attribute1;

    private String attribute2;

    private String attribute3;

    private String attribute4;

    private String attribute5;


    //产品字段
    @ApiModelProperty(value = "产品名称" )
    @TableField(exist = false)
    @Transient
    private String productName;

    @ApiModelProperty(value = "产品编码" )
    @TableField(exist = false)
    @Transient
    private String productCode;

    @ApiModelProperty(value = "产品图片" )
    @TableField(exist = false)
    @Transient
    private String productPic;

    @ApiModelProperty(value = "numScm" )
    @TableField(exist = false)
    @Transient
    private Long numScm;

    @ApiModelProperty(value = "numXscm" )
    @TableField(exist = false)
    @Transient
    private Long numXscm;

    @ApiModelProperty(value = "numMcm" )
    @TableField(exist = false)
    @Transient
    private Long numMcm;

    @ApiModelProperty(value = "numLcm" )
    @TableField(exist = false)
    @Transient
    private Long numLcm;

    @ApiModelProperty(value = "总数量" )
    @TableField(exist = false)
    @Transient
    private Long sumNum;
    //产品字段

    //美甲师字段
    @ApiModelProperty(value = "美甲师" )
    @TableField(exist = false)
    @Transient
    private String manicuristName;

    @ApiModelProperty(value = "美甲师编码" )
    @TableField(exist = false)
    @Transient
    private String manicuristCode;
    //美甲师字段

    //仓库字段
    @ApiModelProperty(value = "仓库名称" )
    @TableField(exist = false)
    @Transient
    private String storehouseName;

    @ApiModelProperty(value = "仓库编码" )
    @TableField(exist = false)
    @Transient
    private String storehouseNum;
    //仓库字段



    public void copy(ProductStock source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
